package com.mj.haier.rrskx.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import javax.persistence.Id;

import org.springframework.data.annotation.*;
import org.springframework.data.elasticsearch.annotations.Document;
import java.io.Serializable;
import java.util.Objects;

/**
 * The BdSwitcher entity.
 * @author ycm
 */
@ApiModel(description = "The BdSwitcher entity. @author ycm")
@Entity
@Table(name = "bd_switcher")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Document(indexName = "bdswitcher")
public class BdSwitcher implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 键
     */
    @ApiModelProperty(value = "键")
    @Column(name = "switcher_key")
    private String switcherKey;

    /**
     * 值
     */
    @ApiModelProperty(value = "值")
    @Id
    @org.springframework.data.annotation.Id
    @Column(name = "switcher_value")
    private String switcherValue;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    @Column(name = "switcher_name")
    private String switcherName;

    // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
    public String getSwitcherKey() {
        return switcherKey;
    }

    public BdSwitcher switcherKey(String switcherKey) {
        this.switcherKey = switcherKey;
        return this;
    }

    public void setSwitcherKey(String switcherKey) {
        this.switcherKey = switcherKey;
    }

    public String getSwitcherValue() {
        return switcherValue;
    }

    public BdSwitcher switcherValue(String switcherValue) {
        this.switcherValue = switcherValue;
        return this;
    }

    public void setSwitcherValue(String switcherValue) {
        this.switcherValue = switcherValue;
    }

    public String getSwitcherName() {
        return switcherName;
    }

    public BdSwitcher switcherName(String switcherName) {
        this.switcherName = switcherName;
        return this;
    }

    public void setSwitcherName(String switcherName) {
        this.switcherName = switcherName;
    }
    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        BdSwitcher bdSwitcher = (BdSwitcher) o;
        if (bdSwitcher.getSwitcherValue() == null || getSwitcherValue() == null) {
            return false;
        }
        return Objects.equals(getSwitcherValue(), bdSwitcher.getSwitcherValue());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getSwitcherValue());
    }

    @Override
    public String toString() {
        return "BdSwitcher{" +
            "switcherValue='" + getSwitcherValue() + "'" +
            ", switcherKey='" + getSwitcherKey() + "'" +
            ", switcherName='" + getSwitcherName() + "'" +
            "}";
    }
}
